package com.roadjava.demo06.anno;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = {UserStatusValidator.class}) // 绑定一个或多个校验器类，UserStatusValidator
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface UserStatus {

    String message() default "status必须是1000/1001/1002";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}